import QtQuick 1.1
import QtMobility.location 1.2

import com.nokia.meego 1.0
import com.nokia.extras 1.1

Page {
    id: root
    tools: mainTabBar

    TabGroup {
        id: tabGroup
        anchors.fill: parent
        currentTab: addDefect

        HoleForm { id: addDefect; anchors.fill: parent }
        HoleList { id: listDefects; anchors.fill: parent }
    }
    ToolBarLayout {
        id: mainTabBar
        anchors.bottom: parent.bottom
        // ToolIcon { iconId: "toolbar-back"; onClicked: pageStack.pop(); }
        ButtonRow {
            style: TabButtonStyle { }
            TabButton {
                iconSource: "image://theme/icon-m-toolbar-add"
                tab: addDefect
                text: qsTr("Add")
            }
            TabButton {
                iconSource: "image://theme/icon-m-toolbar-list"
                tab: listDefects
                text: qsTr("List")
            }
        }
        ToolIcon {
            platformIconId: "toolbar-view-menu"
            anchors.right: (parent === undefined) ? undefined : parent.right
            onClicked: (mainMenu.status == DialogStatus.Closed) ? mainMenu.open() : mainMenu.close()
        }
    }
}
